#pragma once

namespace lang{

template<typename ImplOwner>
class ImplAdapter
{
	typedef ImplAdapter<ImplOwner> SelfAdapter;
protected:
	typedef ImplOwner ThisClass;

	ImplAdapter(void)
	: m_this(NULL)
	{
	}

	ImplAdapter(ImplOwner* _this)
	: m_this(_this)
	{
	}

	~ImplAdapter(void)
	{
	}

	ImplOwner* This() const
	{
		return m_this;
	}

public:
	void setThis(ImplOwner* _this)
	{
		m_this = _this;
	}

private:
	ImplOwner* m_this;
};

} //namespace lang